/*
* @Project_description: 角色api
*/

export default ({ request }) => ({
//查询单个
  find(params) {
    return request({
      url: 'role/findRolePageByCondition',
      method: 'post',
      params,
    })
  },
//查询list
  list(data) {
    return request({
      url: 'role/findRolePageByCondition',
      method: 'post',
      data,
    })
  },
//修改
  put(data) {
    return request({
      url: 'role/createOrUpdateRoleInfo',
      method: 'post',
      data,
    })
  },
//添加单个
  add(data) {
    return request({
      url: 'role/createOrUpdateRoleInfo',
      method: 'post',
      data,
    })
  },
//删除
  del(params) {
    return request({
      url: 'role/delRoleById',
      method: 'get',
      params,
    })
  },
})
